package org.eenie.cartoonist.ui.movie;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import org.eenie.cartoonist.R;
import org.eenie.cartoonist.base.BaseActivity;
import org.eenie.cartoonist.model.MovieEntryEntity;
import org.eenie.cartoonist.utils.LogUtil;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * 电影条目UI
 */
public class MovieEntryActivity extends BaseActivity implements MovieEntryView {

    MovieEntryPresenter mPresenter;
    @Bind(R.id.btnLoad)
    Button btnLoad;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_movie_entry);
        ButterKnife.bind(this);
        initDate();
    }

    private void initDate() {
        mPresenter = new MovieEntryPresenter(this);
    }

    @Override
    public void startNet(String msg) {

    }

    @Override
    public void finishNet() {

    }

    @Override
    public void error(String msg) {

        LogUtil.e(msg);

        Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
    }


    @OnClick(R.id.btnLoad)
    public void onClick(View v) {


        mPresenter.fetMovieEntry("1764796");
    }

    @Override
    public void displayMovieEntry(MovieEntryEntity entity) {




    }


}
